﻿using System.Collections.Generic;
using System.Linq;

namespace Pap.Data
{
    /// <summary>
    /// 
    /// </summary>
    public partial class Board : IBoard
    {
        #region IBoard Members

        /// <summary>
        /// Gets the committee obj.
        /// </summary>
        public ICommittee CommitteeObj
        {
            get { return Committee; }
        }

        /// <summary>
        /// Gets the board members.
        /// </summary>
        public IEnumerable<IBoardMember> BoardMembers
        {
            get { return this.BoardAttendees.Select(a => a.BoardMember).OfType<IBoardMember>(); }
        }

        /// <summary>
        /// Gets the board loans.
        /// </summary>
        IEnumerable<IBoardLoan> IBoard.BoardLoans
        {
            get { return this.BoardLoans.OfType<IBoardLoan>(); }
        }

        /// <summary>
        /// Gets the board attachments.
        /// </summary>
        IEnumerable<IBoardAttachment> IBoard.BoardAttachments
        {
            get { return this.BoardAttachments.OfType<IBoardAttachment>(); }
        }

        #endregion
    }
}
